package com.example.smartcampus;

import androidx.appcompat.app.AppCompatActivity;

import android.annotation.SuppressLint;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.ImageButton;
import android.widget.TextView;

public class News extends AppCompatActivity {
TextView myName;
ImageButton music;
    @SuppressLint("MissingInflatedId")
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_news);
        myName = findViewById(R.id.myName);
        music = findViewById(R.id.music);
        String data = getIntent().getStringExtra("username");
        myName.setText("用户："+data);
        music.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                Intent intent = new Intent(News.this,Music.class);
                startActivity(intent);
            }
        });
    }
}